#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <qapplication.h>
#include <qmainwindow.h>
#include <qwt_counter.h>
#include <qtoolbar.h>
#include <qlabel.h>
#include <qlayout.h>
#include <QMutex>
#include <QSize>
#include <QThread>
#include <QWaitCondition>
#include <QApplication>
#include <QFont>
#include <QLCDNumber>
#include <QPushButton>
#include <QSlider>
#include <QVBoxLayout>
#include <QWidget>
#include <QDialog>
#include<QGroupBox>
#include<QFormLayout>
#include<QRadioButton>
#include<QSpinBox>
#include<QImage>
#include<QImageReader>
#include<QPixmap>
#include<QPalette>
#include<QObject>
#include <QPainter>
#include <QMessageBox>
#include <QLineEdit>
#include <QComboBox>

#include <assert.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <vector>
#include "slider_with_box.h"

#include "my_DC_motor.h"
#include "my_servo_motor.h"

#include <Qtgui>




class MainWindow : public QMainWindow
{
    Q_OBJECT
    
public:
    explicit MainWindow(QWidget *parent = 0);
    void timerEvent(QTimerEvent *event);

    int gui_timer_id;
    int start_or_end_program_flag;
    QPushButton *end_program_button;
    my_DC_motor *DC_motor_0;
    my_servo *servo_board;
    slider_with_box *slider_test;
    double DC_motor_0_set_pos;
    std::vector<double> servo_start_angle;
    QTimer *PID_Timer;              // Timer for PID Loop
    ~MainWindow();

public Q_SLOTS:
        void end_program();
        void start_program();
        void PID_Loop();


};

#endif
